package com.yxy.springcloud.framework.microservice2.controller;

import com.yxy.springcloud.framework.common.base.RestResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class HelloController {

  @GetMapping("/sayHello")
  public RestResponse sayHello() throws Exception {
    RestResponse restResponse = new RestResponse(200, "成功");
    restResponse.setContent("hello world");
    Thread.sleep(5000);
    return restResponse;
  }
}
